public class demo7 {
    public static void main(String[] args) {
        int[] arry1 = {1,2,3,4,5};
        printArry(arry1);
    }
    public static void printArry(int[] arry){
        for (int i = 0; i < arry.length; i++) {
            if(i == arry.length-1){
                System.out.print(arry[i]);
            }else {
                System.out.print(arry[i] + ",");
            }
        }
    }
}
